import { Repository } from "typeorm";
import { Injectable } from "@/common/core";
import { InjectRepository } from "@/common/typeorm";
import { Config } from "@/common/config";
import { TestEntity } from "./entity/test.entity";
import { AbcEntity } from "./entity/abc.entity";

@Injectable()
export class TestService {
  @InjectRepository(TestEntity)
  testRepository: Repository<TestEntity>;
  @InjectRepository(AbcEntity)
  abcRepository: Repository<AbcEntity>;

  @Config() config: any;

  async test() {
    const data = await this.testRepository.find();
    console.log("第一获取注入Test！");
    return data;
  }
}
